
<form method="post" action="/oss/?r=tmsc/sdoAdd">
    <{include file='../common_params.tpl'}>

    <div class="box box-black">
        <div class="box-body">
            <table class="table table-bordered">
                <colgroup>
                    <col style="width: 20%;"></col>
                    <col style="width: 80%;"></col>
                </colgroup>

                <tr class="end-by-num end-by-time">
                    <th class="th-label">内部标识</th>
                    <td>
                        <input type="text" name="name" class="form-control inline" value="" />
                    </td>
                </tr>
                
                <tr>
                    <th class="th-label">表现状态</th>
                    <td>
                        <select id="sel-end-type" class="form-control inline" name="show_status">
                            <option value="1">普通</option>
                            <option value="2">推荐</option>
                        </select>
                    </td>
                </tr>
                
                <tr class="end-by-num end-by-time">
                    <th class="th-label">IP地址</th>
                    <td>
                        <input type="text" name="ip" class="form-control inline" value="" />
                    </td>
                </tr>
                
                <tr class="end-by-num end-by-time">
                    <th class="th-label">端口</th>
                    <td>
                        <input type="text" name="port" class="form-control inline" value="" />
                    </td>
                </tr>
                
                <tr>
                    <th class="th-label">漂浮窗状态</th>
                    <td>
                        <select id="sel-end-type" class="form-control inline" name="float_status">
                            <option value="1">状态1</option>
                            <option value="2">状态2</option>
                        </select>
                    </td>
                </tr>
                
                <tr>
                    <th class="th-label">开服时间</th>
                    <td><input type="text" name="open_time" class="form-control inline time" /></td>
                </tr>

               
                
            </table>
        </div>

        <div class="box-footer">
            <a href="javascript:history.go(-1);" class="btn btn-default">返回</a>
            <button type="submit" name="sub" class="btn btn-default pull-right">保存</button>
        </div>
    </div>
</form>


<script>
    $(function(){
        $(".time").datetimepicker({
            format: 'yyyy-mm-dd hh:ii:00',
        });


        $('button[name="sub"]').click(function(){
        	var name = $('input[name="name"]').val();
        	if(name == ''){
        		layer.alert('请填写内部标识', {icon: 2, skin: 'layui-layer-molv'});
            	return false;
        	}
        	
        	var show_status = $('select[name="show_status"]').val();
        	if(show_status == ''){
        		layer.alert('请选择表现状态', {icon: 2, skin: 'layui-layer-molv'});
            	return false;
        	}
        	
        	var ip = $('input[name="ip"]').val();
        	if(ip == ''){
        		layer.alert('请填写IP地址', {icon: 2, skin: 'layui-layer-molv'});
            	return false;
        	}
        	
        	var port = $('input[name="port"]').val();
        	if(port == ''){
        		layer.alert('请填写端口号', {icon: 2, skin: 'layui-layer-molv'});
            	return false;
        	}
        	
        	var float_status = $('select[name="float_status"]').val();
        	if(float_status == ''){
        		layer.alert('请选择漂浮窗状态', {icon: 2, skin: 'layui-layer-molv'});
            	return false;
        	}
        	
        	var open_time = $('input[name="open_time"]').val();
        	if(open_time == ''){
        		layer.alert('请填写开服时间', {icon: 2, skin: 'layui-layer-molv'});
            	return false;
        	}
        	
        });
        
    });
</script>